<?php
$mu = Session::get('mu');
$menuManage = (new Model('pc_menu_manage'))->where(['pid'=>$mu->id])->list_all();
// $menu = json_decode($menuManage->menu,1);
//$menuArr = ['index'=>'首页','zhishi'=>'知识付费','live'=>'直播课堂','list'=>'新闻资讯','agent'=>'代理加盟','about'=>'关于我们','one'=>'预留菜单','two'=>'预留菜单'];
// $menuArr = ['one'=>'预留菜单'];
if(Request::post()){
	// $menuManage->pid = $mu->id;
	// $menuManage->menu = json_encode($_POST,320);
	// $menuManage->save();
	// tusi('操作成功');
	// $menu = json_decode($menuManage->menu,1);
	foreach ($menuManage as $menu) {
		// $keyname = 
		$menu->name = $_POST['name@'.$menu->id];
		$menu->display = $_POST['display@'.$menu->id];
		$menu->url = $_POST['url@'.$menu->id];
		$menu->save();
	}
	tusi('设置成功');
} 

// $operate = Request::get(1);